import axios from '~/axios'

export function getRoleList(page,pageSize){
    return axios.post("/sys/role/getRoleList",{
        page,
        pageSize
    })
}

export function getRoleDetail(id){
    return axios.post("/sys/role/getRoleInfo",{
        id
    })
}

export function createRole(data){
    return axios.post("/sys/role/create",data)
}

export function saveRole(saveData){
    return axios.put("/sys/role/setRole",saveData)
}

export function deleteRole(id){
    return axios.post("/sys/role/deleteRole",{
        id
    })
}

export function getRoleRules(id){
    return axios.post("/sys/role/getRoleRules",{
        id
    })
}

export function setRoleRules(id,RuleIds){
    return axios.post("/sys/role/setRoleRules",{
        id,
        RuleIds
    })
}
